//
//  ViewController.m
//  EaseIMTest
//
//  Created by yshow on 16/8/25.
//  Copyright © 2016年 yshow. All rights reserved.
//

#import "ViewController.h"
#import "ChatViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.、
    
    UIButton *chatBtn = [[UIButton alloc]initWithFrame:CGRectMake(15, 100, 80, 40)];
    [chatBtn setTitle:@"单聊" forState:(UIControlStateNormal)];
    [chatBtn setBackgroundColor:[UIColor blueColor]];
    [chatBtn addTarget:self action:@selector(chatAction:) forControlEvents:(UIControlEventTouchUpInside)];
    [self.view addSubview:chatBtn];
    

}

#pragma mark - Action
-(void)chatAction:(UIButton *)sender
{
    
    ChatViewController *evc = [[ChatViewController alloc]initWithConversationChatter:@"40" conversationType:(EMConversationTypeChat)];
    [self.navigationController pushViewController:evc animated:YES];
    
}



- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
